from pages.base_page import BasePage
from pages.elements import Elements

'''
下单详情页
'''
class OrderPage(BasePage):
    pass
    '''
    立即支付
    '''
    def pay_now(self):
        self.click_element(Elements.PAY_BTN)
        self.click_element(Elements.ALERT_PAY_BTN)
    '''
    取消订单
    '''
    def cancel_order(self):
        self.click_element(Elements.CANCEL_BTN)

    '''
    检查订单状态
    '''
    def check_order_status(self):
        self.sleep(3)
        return self.find_element(Elements.ORDER_INFO_TITLE).text
